<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
  <base href="<%=request.getContextPath()%>/">
  <meta charset="UTF-8">
  <title>Question Manage</title>
  <link rel="stylesheet" type="text/css" href="${surl}css/style.css" />
  <link rel="stylesheet" type="text/css" href="${surl}css/question.css" />
</head>
<body>
    <c:set var="ql" value="question/qPage"/>
    <c:set var="qli" value="question/queryId"/>
    <c:set var="ud" value="question/updatePage"/>
    <c:set var="cr" value="question/createPage"/>
  <jsp:include page="head.jsp"></jsp:include>
  <div class="page_disabled"></div>
  <div class="all">
    <div class="content">
      <div class="query">
        <input id="query_input" class="query_input" type="text" name="fuzzyWord" placeholder="&nbsp;Please input the keyword" />
        <input id="search_img" class="search_img" type="image" src="${surl}images/ICN_Search_15x20.png">
      </div>

      <div class="nav">
        <ul class="nav_group">
          <li class="nav_btn nav_active">Question List</li>
          <a href="${cr}"><li class="nav_btn">Create Question</li></a>
        </ul>
      </div>
      <div class="query_content">

        <table class="question_table">
          <thead>
            <tr class="table_head">
              <th class="q_no">&nbsp;</th>
              <th class="q_id">ID<img class="order_img" src="${surl}images/ICN_Decrese_10x15.png"></th>
              <th class="q_des">Description</th>
              <th class="q_edit">Edit</th>
              <th class="q_select"><input id="all_del" type="checkbox" />All</th>
            </tr>
          </thead>

        </table>

        <div class="bottom_nav">
          <div id="paging" class="paging">
            <img id="page_left" class="group pointer" src="${surl}images/BTN_PageLeft_20x15.png " />
            <span id="page_index"></span>
            <img id="page_right" class="group pointer" src="${surl}images/BTN_PageRight_20x15.png " />
            <select id="page_size" class="selector group">
              <option value="5">5</option>
              <option value="10">10</option>
            </select> <span id="total_page" class="group"></span>
            <input id="page_go" class="group page_input" type="text" maxlength="6" name="currentPage" /> 
            <input id="go_btn" class="btn group" type="button" value="GO" />
          </div>
        </div>
          <input id="delete" class="btn dialog_btn nav_btn2" type="button" value="Delete" />
        </div>
    </div>
  </div>

  <c:if test="${sessionScope.success == 1}">
    <div id="dialog" class="dialog q_dialog">
      <img class="x_close close" src="${surl}images/BTN_Close_16x16.png" />
      <p class="dialog_p">Save successfully</p>
      <input class="btn dialog_btn close" type="button" value="OK" />
    </div>
  </c:if>
    <input id="flag" type="hidden" value="${sessionScope.success}" />
    <c:remove var="success" scope="session" />

    <div id="del_con" class="dialog q_dialog">
      <img class="x_close close" src="${surl}images/BTN_Close_16x16.png" />
      <p class="dialog_p">Are you sure to delete it?</p>
      <input id="del_yes" class="btn dialog_btn" type="button" value="Yes" style="margin-right: 20px;" />
      <input class="btn dialog_btn close" type="button" value="No" />
    </div>
    

    <form id="pageInfo">
    <input id="currentPage" name="currentPage" type="hidden" value="1" />
    <input id="pageSize" name="pageSize" type="hidden" value="5" />
    <input id="fuzzyWord" name="fuzzyWord" type="hidden" />
    <input id="order" name="order" type="hidden" value="1" />
    </form>
    <input id="pageCount" type="hidden" />

  <jsp:include page="foot.jsp"></jsp:include>
  <script src="${surl}js/jquery-1.10.2.min.js"></script>
  <script src="${surl}js/question.js"></script>
  <script src="${surl}js/page.js"></script>
</body>
</html>